<?php

class PlantStealFlowerAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_STRING,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * 偷好友家花
     *
     * @param int $userId
     * @param int $targetUserId
     * @param string $gridId
     * @param int $reqTime
     * @return SzResponse
     */
    public function execute($userId, $targetUserId, $gridId, $reqTime)
    {
        list($status, $count) = PlantService::get()->stealFlower($userId, $targetUserId, $gridId, $reqTime);
        return $this->buildResponse(['status' => $status, 'count' => $count]);
    }
}